package br.odb.bzk3.android;

import br.odb.utils.math.Vec3;
import android.media.MediaPlayer;

public class PositionalMediaPlayer {

	public static PositionalMediaPlayer getFor(Vec3 pos, int resId) {

		MediaPlayer mp = null; 
		//mp = MediaPlayer.create(EngineActivity.getInstance(), resId);
		PositionalMediaPlayer pmp = new PositionalMediaPlayer(mp, pos);
		return pmp;
	}
	private MediaPlayer mp;

	private Vec3 pos;

	public PositionalMediaPlayer(MediaPlayer mp, Vec3 pos) {
		this.pos = pos;
		this.mp = mp;
		//mp.setLooping(false);
	}

	public void play() {
		// mp.start();
	}

	public void playUnique() {
		// if ( !mp.isPlaying() )
		// play();
	}

	public void stop() {
		//mp.stop();
	}

	public void update(Vec3 listener) {

		//Vec3 vol = listener.sub(pos);
		//vol.normalize();
		//mp.setVolume(Math.abs(vol.getX() / 2.0f), Math.abs(vol.getZ() / 2.0f));
	}

}
